<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
        xmlns:c="http://java.sun.com/jstl/core" 
        xmlns:p="http://primefaces.org/ui"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        
        >

    <ui:composition template="template.xhtml">
        <ui:define name="content">
    <div id="body">
        <div class="panel">

            <h2>Products for category :
                <h:outputText value="#{catalog.category.name}"/>
            </h2>

            <h:messages layout="table" styleClass="error"/>

            <h:form>
                
                   
                <p:dataTable value="#{catalog.products}" var="product">
                   
                        
                    <p:column>
                        <p:commandLink action="#{catalog.doFindItems}">
                            <h:outputText value="#{product.name}"/>
                            <f:param name="productId" value="#{product.id}"/>
                        </p:commandLink>
                        <br/>
                        <h:outputText value="#{product.description}"/>
                    </p:column>
                </p:dataTable>
            </h:form>

        </div>
    </div>

            
</ui:define>
	
        
    </ui:composition>
</html>